import { reqBox } from "@/api/user";

const state = {
    box:[]
}
const mutations = {
    SET_BOX(state,box){
        state.box = box
    }
}
const actions = {
    async getBoxList({commit},ssr){
        try{
            const result = await reqBox(ssr)
            console.log(result.allRolesList)
            commit('SET_BOX',result.allRolesList)
        }catch(error){
            alert('请求获取失败')

        }
    },
}
const getters = {}

export default {
    state,mutations,actions,getters
}
